<html>

<head>
    <meta charset="UTF-8" />
    <title></title>
    <style type="text/css">
    	body{
            margin: 0 0 0 0;
            padding: 0 0 0 0;
    	}
        .a1 {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body onload="rnd(0,255)">
    <div id="div1" class="a1">

    </div>
</body>
<script type="text/javascript">
    function rnd(n, m) {
        var random_1 = Math.floor(Math.random() * (m - n + 1) + n);
        var random_2 = Math.floor(Math.random() * (m - n + 1) + n);
        var random_3 = Math.floor(Math.random() * (m - n + 1) + n);
        // var dd = "<div class='a1'style='background-color: rgb(" + random_1 + "," + random_2 "," + random_3 + ");'>xx</div>"
        var dd = '<div class="a1" style="background-color:rgb(' + random_1 + ',' + random_2 + ',' + random_3 + ')"></div>';
        document.getElementById("div1").innerHTML = dd;

    }
</script>

</html>